package com.tianbao54.kotlin_01

fun main(args: Array<String>) {

    var array = listOf("zhangsan","lisi","wangwu","maliu")

    for (str in array) {
        println("str = $str")
    }
    println("-----------")

    when {
        "zhangsan" in array -> println("zhangsan is in array")
    }
    println("-----------")
    array.filter { it.length > 5 }.map { it.toUpperCase() }.sorted().forEach { println(it) }
}